vtd: Fix for irq bind failure after PCI attaching 32 times
authorFengzhe Zhang <fengzhe.zhang@intel.com>
Thu, 27 Jan 2011 11:31:46 +0000 (11:31 +0000)
committerFengzhe Zhang <fengzhe.zhang@intel.com>
Thu, 27 Jan 2011 11:31:46 +0000 (11:31 +0000)
commit92585dd6a9557b7d4842260cdb2d2a4da0d5f854
treea6e0131115d52ac45a3d6a065572886371137b98
parentb920b2c76176ef8850806fb578a4619f1a83e51f
vtd: Fix for irq bind failure after PCI attaching 32 times

Originally when detaching a PCI device, pirq_to_emuirq and pirq_to_irq
are freed via hypercall do_physdev_op. Now in function
pt_irq_destroy_bind_vtd, duplicated logic is added to free
pirq_to_emuirq, but not pirq_to_irq. This causes do_physdev_op fail to
free both emuirq and irq. After attaching a PCI device for 32 times,
irq resources run out. This patch removes the redundant logic.

Signed-off-by: Fengzhe Zhang <fengzhe.zhang@intel.com>
xen/drivers/passthrough/io.c